package com.example.springhelloworld.controller;


import com.example.springhelloworld.model.VO.SoVo;
import com.example.springhelloworld.pojo.So;
import com.example.springhelloworld.services.SoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Controller
public class SoController {



    @Autowired
    private SoService soService;

    @RequestMapping("/test")
    @ResponseBody
    public String quertByStatus(int status ) {
        List<SoVo> list = new ArrayList();
        list = soService.queryByItemsStatus(status);

        System.out.println(list);
        System.out.println("成功访问123");
        return "0";
    }

    @RequestMapping("/test1")
    @ResponseBody
    public void quertByStatus1() {
        List<So> so = soService.queryByItems();

        System.out.println(so);
        System.out.println("成功访问");
    }
}
